<template>
	<div>
		<div class="tabbar">
			<div class="tabbar-item" v-for="(item, index) in datas" :key="index">
				<div class="tabbar-item-icon">
					<img :src="path==item.path ? item.selected : item.pic"/>
				</div>
				<div v-if="item.name" class="tabbar-item-text" :class="path==item.path ? 'active' : ''">{{item.name}}</div>
			</div>
		</div>
		<div style="width: 100%; height: 50px;"></div>
	</div>
</template>
 
<script>
	export default {
		props: {
			datas: Array
		},
		data() {
			return {
				path : ''
			}
		},
		mounted() {
			
		},
		methods: {
		}
	}
</script>

<style lang='less'>
	.tabbar {
		width: 371px;
		position: fixed;
		bottom: 27px;
		height: 50px;
		border-top: 0.5px solid #d5d5d5;
		display: flex;
		justify-content:space-around;
		align-items: center;
		font-size: 0;
		background: #fff;
		z-index: 999;
	}
	.tabbar-item {
		text-align: center;
		overflow: hidden;
		box-sizing: border-box;
		padding: 5px;
		color: #888888;
	}
	.tabbar-item-icon img {
		width:28px;
		height: 28px;
	}
	.tabbar-item-text {
		font-size: 10px;
		line-height: 15px;
	}
	.tabbar-item.active {
		color: @primary-color;
	}
</style>
